﻿@{
    Layout = "~/Views/Shared/_Form.cshtml";
}
<form id="form" class="form-horizontal m" role="form">
    <div class="form-group">
        <label class="col-sm-3 control-label ">实体表名<span class="text-red"> *</span></label>
        <div class="col-sm-9">
            <input id="tableName" name="tableName" col="TableName" type="text" class="form-control required" readonly="readonly"  />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label ">命名空间<span class="text-red"> *</span></label>
        <div class="col-sm-9">
            <input id="nameSpace" name="nameSpace" col="NameSpace" type="text" class="form-control required" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label ">实体描述<span class="text-red"> *</span></label>
        <div class="col-sm-9">
            <input id="classDescription" name="classDescription" col="ClassDescription" type="text" class="form-control required" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label ">实体类名<span class="text-red"> *</span></label>
        <div class="col-sm-9">
            <input id="entityName" name="entityName" col="EntityName" type="text" class="form-control required" />
        </div>
    </div>
</form>
<script>
    var tableName = frame.request("tableName");
    $(function () {
        $('#tableName').val(tableName);
    })
    function saveForm(index) {
        if ($("form").validate().form()) {
            var url = '@Url.Content("/Manage/Generator/ExportEntityJson")';
            var postData = $('form').formSerialize();
            frame.exportExcel(url, postData); 
            parent.layer.close(index);
        }
    }
</script>